package com.opt.sample;

public class Distance {

	public static int getDistance(double startPoint, double endPoint)
			throws Exception {
		int distance = 0;
		if (startPoint == 0 && endPoint == 1) {
			distance = 200;
		} else if (startPoint == 0 && endPoint == 2) {
			distance = 220;
		} else if (startPoint == 0 && endPoint == 3) {
			distance = 530;
		} else if (startPoint == 0 && endPoint == 4) {
			distance = 620;
		} else if (startPoint == 0 && endPoint == 5) {
			distance = 640;
		} else if (startPoint == 0 && endPoint == 6) {
			distance = 400;
		} else if (startPoint == 0 && endPoint == 7) {
			distance = 280;
		} else if (startPoint == 0 && endPoint == 8) {
			distance = 170;
		} else if (startPoint == 0 && endPoint == 9) {
			distance = 110;
		} else if (startPoint == 0 && endPoint == 10) {
			distance = 80;
		} else if (startPoint == 1 && endPoint == 2) {
			distance = 200;
		} else if (startPoint == 1 && endPoint == 3) {
			distance = 400;
		} else if (startPoint == 1 && endPoint == 4) {
			distance = 590;
		} else if (startPoint == 1 && endPoint == 5) {
			distance = 610;
		} else if (startPoint == 1 && endPoint == 6) {
			distance = 480;
		} else if (startPoint == 1 && endPoint == 7) {
			distance = 480;
		} else if (startPoint == 1 && endPoint == 8) {
			distance = 400;
		} else if (startPoint == 1 && endPoint == 9) {
			distance = 280;
		} else if (startPoint == 1 && endPoint == 10) {
			distance = 330;
		} else if (startPoint == 2 && endPoint == 3) {
			distance = 300;
		} else if (startPoint == 2 && endPoint == 4) {
			distance = 400;
		} else if (startPoint == 2 && endPoint == 5) {
			distance = 420;
		} else if (startPoint == 2 && endPoint == 6) {
			distance = 305;
		} else if (startPoint == 2 && endPoint == 7) {
			distance = 150;
		} else if (startPoint == 2 && endPoint == 8) {
			distance = 250;
		} else if (startPoint == 2 && endPoint == 9) {
			distance = 220;
		} else if (startPoint == 2 && endPoint == 10) {
			distance = 240;
		} else if (startPoint == 3 && endPoint == 4) {
			distance = 160;
		} else if (startPoint == 3 && endPoint == 5) {
			distance = 240;
		} else if (startPoint == 3 && endPoint == 6) {
			distance = 300;
		} else if (startPoint == 3 && endPoint == 7) {
			distance = 240;
		} else if (startPoint == 3 && endPoint == 8) {
			distance = 540;
		} else if (startPoint == 3 && endPoint == 9) {
			distance = 500;
		} else if (startPoint == 3 && endPoint == 10) {
			distance = 620;
		} else if (startPoint == 4 && endPoint == 5) {
			distance = 100;
		} else if (startPoint == 4 && endPoint == 6) {
			distance = 280;
		} else if (startPoint == 4 && endPoint == 7) {
			distance = 210;
		} else if (startPoint == 4 && endPoint == 8) {
			distance = 470;
		} else if (startPoint == 4 && endPoint == 9) {
			distance = 640;
		} else if (startPoint == 4 && endPoint == 10) {
			distance = 700;
		} else if (startPoint == 5 && endPoint == 6) {
			distance = 200;
		} else if (startPoint == 5 && endPoint == 7) {
			distance = 220;
		} else if (startPoint == 5 && endPoint == 8) {
			distance = 300;
		} else if (startPoint == 5 && endPoint == 9) {
			distance = 540;
		} else if (startPoint == 5 && endPoint == 10) {
			distance = 600;
		} else if (startPoint == 6 && endPoint == 7) {
			distance = 210;
		} else if (startPoint == 6 && endPoint == 8) {
			distance = 200;
		} else if (startPoint == 6 && endPoint == 9) {
			distance = 220;
		} else if (startPoint == 6 && endPoint == 10) {
			distance = 280;
		} else if (startPoint == 7 && endPoint == 8) {
			distance = 200;
		} else if (startPoint == 7 && endPoint == 9) {
			distance = 220;
		} else if (startPoint == 7 && endPoint == 10) {
			distance = 260;
		} else if (startPoint == 8 && endPoint == 9) {
			distance = 160;
		} else if (startPoint == 8 && endPoint == 10) {
			distance = 220;
		} else if (startPoint == 9 && endPoint == 10) {
			distance = 110;
		} else if (startPoint == endPoint) {
			distance = 0;
		} else if (startPoint == 1 && endPoint == 0) {
			distance = 200;
		} else if (startPoint == 2 && endPoint == 0) {
			distance = 220;
		} else if (startPoint == 3 && endPoint == 0) {
			distance = 530;
		} else if (startPoint == 4 && endPoint == 0) {
			distance = 620;
		} else if (startPoint == 5 && endPoint == 0) {
			distance = 640;
		} else if (startPoint == 6 && endPoint == 0) {
			distance = 400;
		} else if (startPoint == 7 && endPoint == 0) {
			distance = 280;
		} else if (startPoint == 8 && endPoint == 0) {
			distance = 170;
		} else if (startPoint == 9 && endPoint == 0) {
			distance = 110;
		} else if (startPoint == 10 && endPoint == 0) {
			distance = 80;
		} else {
			throw new Exception("startPoint: " + startPoint + " ,endPoint: "
					+ endPoint);
		}
		return distance;
	}

}
